-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate util/dev in favor of cargo alias #5109
Conversation
Not sure if this will pass CI already and it will conflict with #5088 for now. Also not sure about what this part in CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR |
Don't worry about #5088, it's an easy change there The env var makes sure, that clippy_dev gets build in the same target dir as clippy itself. This way libraries can be shared between clippy and clippy_dev. I think there is a cargo flag to also set this. The env var also gets set by CI |
@@ -1,5 +1,6 @@ | |||
[alias] | |||
uitest = "test --test compile-test" | |||
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use --target-dir flag I believe
Regarding the |
f9141d4
to
3f914c5
Compare
If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config`. This means one less shell script and a bit more cross-platform support for contributors.
This allows us to use the method in both `fmt.rs` and `lib.rs` in multiple places. The downside is that we panic inside the method now, instead of using the error handling in `fmt.rs`. We may want to centralize the error handling for clippy_dev at some point, though.
848ce7a
to
3036a2c
Compare
GitHub seems to show the wrong commit order: 3036a2c is the second commit and contains some more cleanup refactoring for finding the project root directory. The PR should be ready for review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with last occurrence of copy of project_root()
function removed.
Co-Authored-By: Philipp Krones <[email protected]>
@bors r=flip1995 |
📌 Commit 8f457fa has been approved by |
Deprecate util/dev in favor of cargo alias This means one less shell script and a bit more cross-platform support for contributors. If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined. changelog: none
☀️ Test successful - checks-travis, status-appveyor |
No, it is not. When unset CARGO_TARGET_DIR env, running |
This means one less shell script and a bit more cross-platform support
for contributors.
If you've been using
./util/dev
before, this now becomescargo dev
.The key part of this change is found in
.cargo/config
where an alias for calling theclippy_dev
binary is defined.changelog: none